package com.lby.graduation.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author 李兵耀
 * @since 2020-12-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Goods implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 闲置物品id
     */
    @TableId(value = "goods_id", type = IdType.AUTO)
    private Integer goodsId;

    /**
     * 用户id
     */
    private Integer userId;

    /**
     * 商品名
     */
    private String goodsName;

    /**
     * 类型
     */
    private String type;

    /**
     * 描述
     */
    private String describes;

    /**
     * 价格
     */
    private BigDecimal price;

    /**
     * 图片路径
     */
    private String gImage;

    /**
     * 创建时间
     * 自动填充时间
     * 格式化时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd ", timezone = "GMT+8")
    private Date createTime;

    private User user;

    private Types types;


}
